# To change this template, choose Tools | Templates
# and open the template in the editor.

import pygame
from pygame.locals import *


class GameState:

    def __init__(self, data):
        self.data = data

    def event(self, evt):
        return 1

    def update(self, ms):
        return 1

    def draw(self, ms):
        pass

    def pause(self):
        pass

    def resume(self):
        pass

    def die(self):
        pass

    def get_dir(self, k):
        if k == K_w or k == K_UP or k == K_KP8:
            return [0, -1]
        elif k == K_a or k == K_LEFT or k == K_KP4:
            return [-1, 0]
        elif k == K_s or k == K_DOWN or k == K_KP2:
            return [0, 1]
        elif k == K_d or k == K_RIGHT or k == K_KP6:
            return [1, 0]
        elif k == K_KP1:
            return [-1, 1]
        elif k == K_KP3:
            return [1, 1]
        elif k == K_KP7:
            return [-1, -1]
        elif k == K_KP9:
            return [1, -1]
        return 0

    def normal_draw(self, ms):
        dat = self.data
        dat.gui.root.draw(dat.gui.screen)
        if dat.hilite.valid == 1:
            dat.gui.screen.blit(dat.hilite.image, dat.hilite.rect)



        